package com.shangdiao.sd_server.util;

import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;


public class KdJedisPool {

	//public final static String  ip = "127.0.0.1";//
	public final static String  ip = "139.196.20.115";
	
	private static JedisPool pool = null;
    private KdJedisPool() 
    {
    }
    public static JedisPool getJedisPool() {
        if (pool == null) {
        	
        	JedisPoolConfig config = new JedisPoolConfig();
        	config.setMaxIdle(300);
        	config.setMinIdle(100);
        	config.setMaxWaitMillis(10000);
        	config.setTestOnBorrow(true);
        	config.setTestOnReturn(true);
        	
        	return new JedisPool(config,ip ,6379,2000,"mypass");
            
            
            
        }
        return pool;
    }
}
